package day05;

public class test {
    public static void main(String[] args) {
        int line = 5;
        for(int i =line;i>0;i--){
            String str = new String("");
            for(int j=2*i-1;j>0;j--)str+="*";
            String str1 = new String("");
            for(int j=line;j>=i;j--)str1+=" ";
            System.out.println(str1+str);
        }
        int[] arr = {1,2,3,4,5};
        System.out.println(avg(arr));

    }
    public static double avg(int[] arr){
        double avg;
        int sum = 0;
        for(int i=0;i<arr.length;i++){
            sum += arr[i];
        }
        avg = sum/arr.length;
        return avg;
    }
}
